package cn.ilovese.collect.datamapper.report;

import cn.ilovese.collect.po.coordination.ReportTask;
import cn.ilovese.collect.po.report.Report;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.Date;
import java.util.List;


public interface ReportMapper {

    List<Report> selectByTaskId(Integer taskId);

    List<Report> selectAll();

    List<Report> selectByUser(Integer userId);

    List<Report> selectOtherReport(@Param(value="taskId") Integer taskId, @Param(value="id") Integer id);

    int deleteByPrimaryKey(Integer id);

    int insert(Report record);

    int insertSelective(Report record);

    Report selectByPrimaryKey(Integer id);

    Report selectByByTaskAndUser(@Param(value="userId") Integer uid, @Param(value="taskId") Integer taskid);

    int updateByPrimaryKeySelective(Report record);

    int updateByPrimaryKey(Report record);

    Date getLastSubmit(Integer userId);

    int getIntervalReportNum(Integer interval, Integer userId);

    List<ReportTask> selectReportTaskByUserid(Integer userId);
}